﻿// <copyright file="Organization.cs" company="Microsoft Corporation">
// Copyright (c) 2009 Microsoft Corporation All Rights Reserved
// </copyright>
// <author>Michael S. Scherotter</author>
// <email>mischero@microsoft.com</email>
// <date>2009-03-25</date>
// <summary>OpenSocial Organization</summary>

namespace opensocial
{
    using System.Windows.Browser;
    using Synergist;

    /// <summary>
    /// OpenSocial Organization wrapper class
    /// </summary>
    public class Organization
    {
        /// <summary>
        /// Initializes a new instance of the Organization class
        /// </summary>
        /// <param name="scriptObject">the opensocial.Organization object</param>
        public Organization(ScriptObject scriptObject)
        {
            if (scriptObject == null)
            {
                return;
            }

            this.Name = scriptObject.getField("opensocial.Organization.Field.NAME") as string;

            this.Title = scriptObject.getField("opensocial.Organization.Field.TITLE") as string;
        }

        /// <summary>
        /// Gets or sets the organization name
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the title at the organization
        /// </summary>
        public string Title { get; set; }
    }
}
